package net.form.processing;

public abstract class Cluster {

	protected int id;

	protected int color;

	protected int heft;

	public Cluster(int id, int heft) {
		super();
		this.id = id;
		this.heft = heft;
	}

	int getId() {
		return id;
	}

	public abstract void clear();

	public abstract double getValue();

	public abstract void addValue(double value);

	public abstract void removeValue(double value);

	public abstract double distance(double value);

	public abstract int getColor();

	public void setColor(int color) {
		this.color = color;
	}

	public abstract String getType();

	public boolean equals(Object c) {
		if (c == null)
			return false;
		if (!(c instanceof Cluster))
			return false;
		Cluster cluster = (Cluster) c;
		if (getType() != null)
			return getType().equals(cluster.getType());
		return false;
	}

	public String toString() {
		return getType() + " [" + getValue() + "] ";
	}

	public abstract Object clone();

	public int getHeft() {
		return heft;
	}

	public void setHeft(int heft) {
		this.heft = heft;
	}

}
